package com.designPatterns.proxy;

public class StaticProxy1 implements ITarget1 {

    private ITarget1 target;

    public StaticProxy1(ITarget1 target) {
        this.target = target;
    }

    @Override
    public void say(String word) {
        this.before();
        this.target.say(word);
        this.after();
    }

    private void before() {
        System.out.println("前置增强！");
    }

    private void after() {
        System.out.println("后置增强！");
    }

}
